Skip to content

[DataFrame] - Add union and union_distinct bindings for DataFrame #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 13, 2022

Conversation

francis-du
Copy link
Contributor

Close #25

/// Calculate the union of two `DataFrame`s, preserving duplicate rows.The
/// two `DataFrame`s must have exactly the same schema
#[args(distinct = false)]
fn union(&self, py_df: PyDataFrame, distinct: bool) -> PyResult<Self> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems confusing to me to have a distinct parameter to this method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When df.union(df,distinct=true), it has the same function as df.union_distinct(df)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then do we need both functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User has two ways to use union distinct, if not necessary I will remove parameter district from union.

@francis-du francis-du force-pushed the df_union_fun branch 2 times, most recently from 7a9183f to 73d750f Compare September 9, 2022 06:18
@andygrove andygrove merged commit adbcae3 into apache:master Sep 13, 2022
@francis-du francis-du deleted the df_union_fun branch November 11, 2022 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Python bindings for DataFrame methods union and union_distinct
2 participants